#! /bin/sh

###############################################################
### get this tip from http://www.deadman.org/sshscreen.html

# save environment variables about ssh
SSHVARS="SSH_CLIENT SSH_TTY SSH_AUTH_SOCK SSH_CONNECTION DISPLAY"

for x in ${SSHVARS} ; do
    (eval echo $x=\$$x) | sed  's/=/="/
                                s/$/"/
                                s/^/export /'
done 1>$HOME/tools/fix_screen_env

echo "after attach to screen's session, run command 'source " $HOME/tools/fix_screen_env "'"
